package chapter06

/**
 * @author zeqi.cw
 */
class Account(val name: String, val balance: Int) {
  
  def print()=name+balance
  
}
object Account {
  def apply(balance: Int) = new Account("sunshine", balance)
}
object Main extends App{
  
  val acc = Account(100)
  print(acc.print())
}